
// Boost Includes ==============================================================
#include <boost/python.hpp>
#include <boost/cstdint.hpp>

// Includes ====================================================================
#include <OpenSG/OSGWindow.h>
#include <OpenSG/OSGWindowBase.h>
#include <OsgPtrHelpers.h>

// Using =======================================================================
using namespace boost::python;

// Declarations ================================================================
namespace  {

BOOST_PYTHON_FUNCTION_OVERLOADS(osg_Window_registerFunction_overloads_1_2, osg::Window::registerFunction, 1, 2)

BOOST_PYTHON_FUNCTION_OVERLOADS(osg_Window_registerGLObject_overloads_1_2, osg::Window::registerGLObject, 1, 2)

BOOST_PYTHON_FUNCTION_OVERLOADS(osg_Window_destroyGLObject_overloads_1_2, osg::Window::destroyGLObject, 1, 2)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Window_draw_overloads_0_1, draw, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Window_drawAllViewports_overloads_0_1, drawAllViewports, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Window_render_overloads_0_1, render, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Window_renderAllViewports_overloads_0_1, renderAllViewports, 0, 1)

BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(osg_Window_dump_overloads_0_2, dump, 0, 2)


}// namespace


// Module ======================================================================
void Export_src_pyste_gen_Window()
{
    scope* osg_WindowBase_scope = new scope(
    class_< osg::WindowBase, bases< osg::AttachmentContainer > , boost::noncopyable >("WindowBase", no_init)
//        .def_readonly("WidthFieldMask", &osg::WindowBase::WidthFieldMask)
//        .def_readonly("HeightFieldMask", &osg::WindowBase::HeightFieldMask)
//        .def_readonly("PortFieldMask", &osg::WindowBase::PortFieldMask)
//        .def_readonly("ResizePendingFieldMask", &osg::WindowBase::ResizePendingFieldMask)
//        .def_readonly("GlObjectEventCounterFieldMask", &osg::WindowBase::GlObjectEventCounterFieldMask)
//        .def_readonly("GlObjectLastRefreshFieldMask", &osg::WindowBase::GlObjectLastRefreshFieldMask)
//        .def_readonly("GlObjectLastReinitializeFieldMask", &osg::WindowBase::GlObjectLastReinitializeFieldMask)
//        .def_readonly("MTInfluenceMask", &osg::WindowBase::MTInfluenceMask)
        .def("getClassType", &osg::WindowBase::getClassType, return_internal_reference< 1 >())
        .def("getClassTypeId", &osg::WindowBase::getClassTypeId)
//        .def("getType", (osg::FieldContainerType& (osg::WindowBase::*)() )&osg::WindowBase::getType, return_internal_reference< 1 >())
        .def("getType", (const osg::FieldContainerType& (osg::WindowBase::*)() const)&osg::WindowBase::getType, return_internal_reference< 1 >())
        .def("getContainerSize", &osg::WindowBase::getContainerSize)
//        .def("getWidth", (osg::UInt16& (osg::WindowBase::*)() )&osg::WindowBase::getWidth, return_value_policy< copy_const_reference >())
        .def("getWidth", (const osg::UInt16& (osg::WindowBase::*)() const)&osg::WindowBase::getWidth, return_value_policy< copy_const_reference >())
//        .def("getHeight", (osg::UInt16& (osg::WindowBase::*)() )&osg::WindowBase::getHeight, return_value_policy< copy_const_reference >())
        .def("getHeight", (const osg::UInt16& (osg::WindowBase::*)() const)&osg::WindowBase::getHeight, return_value_policy< copy_const_reference >())
//        .def("getResizePending", (bool& (osg::WindowBase::*)() )&osg::WindowBase::getResizePending, return_value_policy< copy_const_reference >())
        .def("getResizePending", (const bool& (osg::WindowBase::*)() const)&osg::WindowBase::getResizePending, return_value_policy< copy_const_reference >())
//        .def("getPort", (osg::ViewportPtr& (osg::WindowBase::*)(const osg::UInt32) )&osg::WindowBase::getPort, return_value_policy< copy_const_reference >())
//        .def("getPort", (osg::MFViewportPtr& (osg::WindowBase::*)() )&osg::WindowBase::getPort, return_value_policy< copy_const_reference >())
        .def("getPort", (const osg::MFViewportPtr& (osg::WindowBase::*)() const)&osg::WindowBase::getPort, return_value_policy< copy_const_reference >())
        .def("setWidth", &osg::WindowBase::setWidth)
        .def("setHeight", &osg::WindowBase::setHeight)
        .def("setResizePending", &osg::WindowBase::setResizePending)
        .def("getBinSize", &osg::WindowBase::getBinSize)
        .def("copyToBin", &osg::WindowBase::copyToBin)
        .def("copyFromBin", &osg::WindowBase::copyFromBin)
        .staticmethod("getClassType")
        .staticmethod("getClassTypeId")
    );

    scope().attr("WidthFieldId") = (int)osg::WindowBase::WidthFieldId;
    scope().attr("GlObjectEventCounterFieldId") = (int)osg::WindowBase::GlObjectEventCounterFieldId;
    scope().attr("NextFieldId") = (int)osg::WindowBase::NextFieldId;
    scope().attr("GlObjectLastRefreshFieldId") = (int)osg::WindowBase::GlObjectLastRefreshFieldId;
    scope().attr("HeightFieldId") = (int)osg::WindowBase::HeightFieldId;
    scope().attr("GlObjectLastReinitializeFieldId") = (int)osg::WindowBase::GlObjectLastReinitializeFieldId;
    scope().attr("PortFieldId") = (int)osg::WindowBase::PortFieldId;
    scope().attr("ResizePendingFieldId") = (int)osg::WindowBase::ResizePendingFieldId;

    delete osg_WindowBase_scope;

    scope* osg_Window_scope = new scope(
    class_< osg::Window, bases< osg::WindowBase > , boost::noncopyable, osg::WindowRefPtr >("Window", no_init)
        .def_readonly("unknownConstant", &osg::Window::unknownConstant)
        .def("getClassname", &osg::Window::getClassname)
        .def("changed", &osg::Window::changed)
        .def("addPort", &osg::Window::addPort)
        .def("insertPort", &osg::Window::insertPort)
        .def("replacePort", &osg::Window::replacePort)
        .def("replacePortBy", &osg::Window::replacePortBy)
        .def("subPort", (void (osg::Window::*)(const osg::ViewportPtr&) )&osg::Window::subPort)
        .def("subPort", (void (osg::Window::*)(osg::UInt32) )&osg::Window::subPort)
        .def("registerExtension", &osg::Window::registerExtension)
        .def("ignoreExtensions", &osg::Window::ignoreExtensions)
//        .def("registerFunction", &osg::Window::registerFunction, osg_Window_registerFunction_overloads_1_2())
//        .def("registerConstant", &osg::Window::registerConstant)
//        .def("setGLLibraryName", &osg::Window::setGLLibraryName)
        .def("getExtensionId", &osg::Window::getExtensionId)
        .def("hasExtension", (bool (osg::Window::*)(osg::UInt32) )&osg::Window::hasExtension)
        .def("hasExtension", (bool (osg::Window::*)(const osg::Char8*) )&osg::Window::hasExtension)
        .def("hasCommonExtension", &osg::Window::hasCommonExtension)
        .def("dumpExtensions", &osg::Window::dumpExtensions)
        .def("getConstantValue", &osg::Window::getConstantValue)
        .def("getConstantValuev", &osg::Window::getConstantValuev, return_value_policy< copy_const_reference >())
//        .def("getRegisteredExtensions", &osg::Window::getRegisteredExtensions, return_value_policy< copy_const_reference >())
//        .def("getRegisteredFunctions", &osg::Window::getRegisteredFunctions, return_value_policy< copy_const_reference >())
//        .def("getExtensions", &osg::Window::getExtensions, return_value_policy< copy_const_reference >())
//        .def("getIgnoredExtensions", &osg::Window::getIgnoredExtensions, return_value_policy< copy_const_reference >())
//        .def("registerGLObject", &osg::Window::registerGLObject, osg_Window_registerGLObject_overloads_1_2())
//        .def("validateGLObject", &osg::Window::validateGLObject)
//        .def("validateAllGLObjects", &osg::Window::validateAllGLObjects)
//        .def("getGLObjectStatus", &osg::Window::getGLObjectStatus)
//        .def("setGLObjectId", &osg::Window::setGLObjectId)
//        .def("getGLObjectId", &osg::Window::getGLObjectId)
//        .def("refreshGLObject", &osg::Window::refreshGLObject)
//        .def("reinitializeGLObject", &osg::Window::reinitializeGLObject)
//        .def("destroyGLObject", &osg::Window::destroyGLObject, osg_Window_destroyGLObject_overloads_1_2())
//        .def("unpackIdStatus", &osg::Window::unpackIdStatus)
        .def("isResizePending", &osg::Window::isResizePending)
        .def("resize", &osg::Window::resize)
        .def("resizeGL", &osg::Window::resizeGL)
        .def("setSize", &osg::Window::setSize)
        .def("frameInit", &osg::Window::frameInit)
        .def("frameExit", &osg::Window::frameExit)
//        .def("draw", &osg::Window::draw, osg_Window_draw_overloads_0_1())
//        .def("drawAllViewports", &osg::Window::drawAllViewports, osg_Window_drawAllViewports_overloads_0_1())
//        .def("render", &osg::Window::render, osg_Window_render_overloads_0_1())
//        .def("renderAllViewports", &osg::Window::renderAllViewports, osg_Window_renderAllViewports_overloads_0_1())
        .def("init", &osg::Window::init)
        .def("activate", &osg::Window::activate)
        .def("deactivate", &osg::Window::deactivate)
        .def("swap", &osg::Window::swap)
        .def("dump", &osg::Window::dump, osg_Window_dump_overloads_0_2())
        .staticmethod("getExtensionId")
//        .staticmethod("registerGLObject")
//        .staticmethod("destroyGLObject")
        .staticmethod("hasCommonExtension")
//        .staticmethod("unpackIdStatus")
//        .staticmethod("refreshGLObject")
//        .staticmethod("reinitializeGLObject")
//        .staticmethod("registerFunction")
        .staticmethod("ignoreExtensions")
        .staticmethod("registerExtension")
//        .staticmethod("getRegisteredExtensions")
        .staticmethod("getClassname")
//        .staticmethod("registerConstant")
//        .staticmethod("setGLLibraryName")
    );

    enum_< osg::Window::GLObjectStatusE >("GLObjectStatusE")
        .value("initialized", osg::Window::initialized)
        .value("finaldestroy", osg::Window::finaldestroy)
        .value("notused", osg::Window::notused)
        .value("needrefresh", osg::Window::needrefresh)
        .value("destroy", osg::Window::destroy)
        .value("initialize", osg::Window::initialize)
        .value("reinitialize", osg::Window::reinitialize)
    ;


    scope().attr("invalidExtensionID") = (int)osg::Window::invalidExtensionID;
    scope().attr("invalidFunctionID") = (int)osg::Window::invalidFunctionID;


    scope().attr("statusMask") = (int)osg::Window::statusMask;
    scope().attr("statusShift") = (int)osg::Window::statusShift;

    delete osg_Window_scope;


    register_ptr_to_python<osg::WindowPtr>();
    implicitly_convertible<osg::WindowRefPtr, osg::WindowPtr>();
    implicitly_convertible<osg::WindowPtr, osg::AttachmentContainerPtr>();

    def("RefPtr", &pyopensg::ToRefPtr<osg::WindowPtr>);
    def("FCPtr", &pyopensg::ToFcPtr<osg::WindowPtr>);
}

